package com.xyht.sca_s.student_manage_system.modules.wx.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ReplyMessageEntity {
    @ApiModelProperty("接收方帐号（收到的OpenID）")
    private String ToUserName;

    @ApiModelProperty("开发者微信号")
    private String FromUserName;

    @ApiModelProperty("消息创建时间 （整型）")
    private String CreateTime;

    @ApiModelProperty("消息类型")
    private String MsgType;

    @ApiModelProperty("消息信息")
    private String Content;

    @ApiModelProperty("图文消息个数；当用户发送文本、图片、语音、视频、图文、地理位置这六种消息时，开发者只能回复1条图文消息；其余场景最多可回复8条图文消息")
    private Integer ArticleCount;

    @ApiModelProperty("图文消息信息，注意，如果图文数超过限制，则将只发限制内的条数")
    private ReplyArticlesEntity Articles = new ReplyArticlesEntity();

    @Override
    public String toString(){
        return "<xml><ToUserName><![CDATA[" + ToUserName + "]]></ToUserName>" +
                "<FromUserName><![CDATA[" + FromUserName + "]]></FromUserName>" +
                "<MsgType><![CDATA[" + MsgType + "]]></MsgType>" +
                "<Content><![CDATA[" + Content + "]]></Content>" +
                "<CreateTime>" + CreateTime + "</CreateTime>" +
                "<ArticleCount>" + ArticleCount + "</ArticleCount>" +
                "<Articles>" + Articles.toString() + "</Articles></xml>" ;
    }


}
